﻿/*
 * 由SharpDevelop创建。
 * 用户： Administrator
 * 日期: 2024/11/30
 * 时间: 3:09
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using System.IO;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace word
{
	/// <summary>
	/// Description of MainForm.
	/// </summary>
	public partial class MainForm : Form
	{
		public MainForm()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			string inipath=Directory.GetCurrentDirectory()+"\\setting.ini"; 
			int x=int.Parse(iniHelper.Read("Word","left",inipath));
			int y=int.Parse(iniHelper.Read("Word","top",inipath));
			this.Location=new Point(x,y);
			 
			int w=int.Parse(iniHelper.Read("Word","width",inipath));
			int h=int.Parse(iniHelper.Read("Word","height",inipath));
			this.Size=new Size(w,h);
			
			string t=iniHelper.Read("Word","text",inipath);
			label1.Text=t;
            
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		void Timer1Tick(object sender, EventArgs e)
		{
			string inipath=Directory.GetCurrentDirectory()+"\\setting.ini"; 
			string color=iniHelper.Read("Topbar","backcolor",inipath);
			this.BackColor =ColorTranslator.FromHtml(color); 
		}
	}
}
